<!DOCTYPE html>
<html>
<head>
    <title></title>
    <meta charset="utf-8">
    <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport">
</head>
<body style="height: 2000px;">

<div id="nav-tab"></div>
<div id="box" style="width: 100%;height: 100px;background: #f00;margin-top: 200px;"></div>

<script type="text/javascript" src="https://cdn.bootcss.com/zepto/1.0rc1/zepto.min.js"></script>
<script type="text/javascript" src="./top.js"></script>
<script type="text/javascript" src="./nav.js"></script>

<script type="text/javascript">
        
    new StickyNav({
        navEl: $('#nav-tab')[0],
        data: ['童装', '童鞋', '全科', '图书'],
        changeTab(navItemEl, next) {
            console.log(navItemEl)
            next();
        }
    })

</script>
</body>
</html>